1. Field of the Invention
The present invention relates to a method, computer, recording medium, and transmission medium for controlling an expansion unit and, in particular, when a computer main unit is to be attached or detached from the expansion unit, to an expansion unit controlling method which performs a predetermined process for the device which is installed in the expansion unit, a computer to which the expansion unit controlling method can be applied, a recording medium on which a program for implementing the expansion unit controlling method by a computer, and a transmission medium for transmitting the program for implementing the expansion unit controlling method by a computer.
2. Description of the Related Art
There are various types of peripheral device that can be installed in (or connected to) a personal computer (PC), including, for example, a hard disk drive (HDD), a floppy disk drive (FDD), a CD-ROM drive, and a DVD (Digital Video Disc or Digital Versatile Disc) drive. On the other hand, as notebook PCs are becoming increasingly smaller and lighter, the number and types of devices that can be installed in the PCs are becoming limited.
Therefore, an expansion unit (called a xe2x80x9cdocking stationxe2x80x9d, or xe2x80x9cport replicatorxe2x80x9d), that can be easily attached and detached to and from the main unit of the notebook PC and to which various devices can be attached selectively, is provided for many notebook PCs. By installing a desired device that is not preinstalled in the main unit of the PC and connecting the PC main unit with the expansion unit, various capabilities can be implemented by using the desired device. When the PC is moved (e.g., made portable), the main unit of the PC can be detached from the expansion unit to avoid the inconvenience during the PC""s movement.
Recent operating systems (OS) and Basic Input/Output Systems (BIOS) (i.e., a program for controlling input/output operations of hardware such as a keyboard and floppy disk drive) typically support xe2x80x9cPlug and Playxe2x80x9d (PnP) capability (i.e., the capability of a computer to automatically recognize a newly connected device and perform auto-configuration such as processes for allocating system resources thereto and loading the driver associated therewith) and also the expansion unit can be easily attached/detached to/from the main unit of the PC whether power to the main unit of the PC is off or the OS is running.
When the PC main unit is attached to the expansion unit during a power-off state of the PC main unit, the PnP capability is accomplished by a BIOS (in particular, Power-On Self Test (POST) routines in the BIOS) and the OS. When the PC main unit is attached to the expansion unit while the OS is running on the PC [(in detail, when the PC main unit is attached to the expansion unit during an energy-saving mode such as a suspend mode or the like. What is called xe2x80x9cwarm docking,xe2x80x9d or while the PC main unit is not in an energy-saving mode or a quasi-energy-saving mode (e.g., stand-by mode), (so-called xe2x80x9chot dockingxe2x80x9d))], PnP capability is implemented by the OS (i.e., the BIOS detects the connection of the PC main unit with the expansion unit and interconnects both of their buses).
To prevent information resources from being compromised by unauthorized use of a PC, recently, many devices, such as a HDD as well as the main unit of the PC can be password-protected. Therefore, the use of a device installed in an expansion unit may be locked with a password when the expansion unit is attached to the main unit of the PC.
Auto-configuration is performed by an OS when the expansion unit is connected to the PC main unit on which the OS is running. However, none of the existing OSs support the capability of prompting a user to enter a password, and using the entered password to unlock a locked device installed in the expansion unit attached to the PC main unit. Therefore, if a device locked with a password is installed in the expansion unit attached to the PC main unit, then the password cannot be cleared, and the device cannot be used.
Japanese Published Unexamined Patent Application No. 9-237229 discloses a technique in which a system BIOS detects the presence or absence of an access-locked storage device in an expansion unit when the expansion unit is connected to the main unit of a PC. If it detects the presence of an access-locked storage device, then the system BIOS issues an APM event to cause an OS to activate a high-level driver and the high-level driver prompts the user to enter a password to release the access lock.
However, the technique described in the above-mentioned application requires a special BIOS and driver having the capability of releasing the password lock so that the system BIOS and the high-level driver cooperate together to unlock a device locked with a password. However, whereas the BIOS is stored in ROM (e.g., a flash ROM), the driver is stored in the HDD. Therefore, the special driver having the capability of clearing the password must be reinstalled when, for example, the HDD is formatted and the OS is re-installed. If the user forgets to re-install the special driver or unintentionally uninstalls it, then the operation of clearing the password cannot work. Therefore, it is desirable that the BIOS itself should implement the capability of clearing the password.
By the same token, for the xe2x80x9chot-dockingxe2x80x9d or xe2x80x9cwarm-dockingxe2x80x9d of the PC main unit with the expansion unit, when a physical connection between the PC main unit and the expansion unit is detected, a BIOS is first activated. The activated BIOS connects the bus of the PC main unit with the bus of the expansion unit and performs other required processes, and then notifies an OS of the connection between the PC main unit and the expansion unit. The notified OS performs a sequence of processes such as the allocation of system resources such as I/O space, the loading of an appropriate device driver and other processes to the device installed in the expansion unit. Once control is passed to the OS, there is no opportunity for the BIOS to be re-activated for hot-docking or warm-docking.
Therefore, for the BIOS itself to perform processes such as unlocking a locked device installed in an expansion unit during hot-docking or warm-docking of the PC main unit with an expansion unit, the BIOS itself should allocate I/O space to the device installed in the expansion unit, clear a password, and perform other processes on behalf of the OS before passing control to the OS.
However, it is difficult for the BIOS to detect proper I/O space allocatable to the device installed in the expansion unit during hot-docking or warm-docking. Because I/O space allocation to devices preinstalled in the PC when the PC is powered on is performed by POST, which is part of the BIOS, the BIOS recognizes the addresses of I/O space that are initially allocated to the devices during the power-on of the PC. However, if the I/O space allocation is changed by the OS because of a connection of a new device (e.g., a PC card), then the BIOS is not notified of the change. Therefore, it is difficult for the BIOS to recognize available I/O space during hot-docking or warm-docking.
To solve the above-mentioned problem, the BIOS may look for currently unused I/O space and allocate I/O space identified as unused space to devices in the expansion unit during the hot-docking or warm-docking of the PC main unit with the expansion unit. However, the process is lengthy because searching for unused I/O space is a highly complicated process. In addition, memory cannot be effectively used because an enormous number of instruction codes must be stored in the memory in preparation for the hot-docking or warm-docking of the PC main unit with the expansion unit, even though when and whether it will occur is unknown.
In view of the foregoing and other problems, disadvantages, and drawbacks of the conventional methods and structures, an object of the present invention is to provide a method, computer, recording medium, and transmission medium for controlling an expansion unit that allow a predetermined process to be performed simply for an expansion unit attached to or to be detached from the main unit of a computer on which an operating system is running.
The expansion unit control method according to the present invention allocates a predetermined I/O resource ensured not to be used in processing (i.e., during the execution of a process according to the present invention) to a device installed in an expansion unit as an I/O resource for sending and receiving information when it is detected that a computer main unit is physically attached to the expansion unit, or it is notified that the computer main unit is to be detached from the expansion unit, while an operating system is running on the computer main unit to which the expansion unit containing one or more devices can be attached.
The predetermined I/O resource ensured not to be used in the processing may be, for example, I/O space allocated to a device (e.g., a gate array) which is connected to an Industry Standard Architecture (ISA) bus of the computer main unit and is specific to the computer main unit. I/O space allocated to the device specific to the computer main unit can be easily ensured not to be used during the process because only limited elements access the device specific to the computer main unit (e.g., it can be ensured by simple means for masking an interruption in the processing).
As mentioned above, I/O space allocated to devices (ISA devices) connected to the ISA bus is fixed. If the fixed I/O space allocated to the devices includes I/O space that will never be used for a device installed on the OS (e.g., if an ISA IDE controller is connected to the ISA bus but only one bay (e.g., a bay for a primary channel) is physically provided, and when no bay for a secondary channel exists, I/O space allocated to the secondary channel will never be used on the OS), the I/O space may be used alternatively as the predetermined I/O space.
As described above, information can be sent and received to and from a device installed in the expansion unit through a predetermined I/O resource by allocating the predetermined I/O resource to the device, even if the device is a PCI device connected to a Peripheral Component Interconnect (PCI) bus. Therefore, according to the present invention, the predetermined process is performed for the device by exchanging information with the device installed in the expansion unit through the predetermined I/O resource. After the completion of the predetermined process, the predetermined I/O resource allocated to the device installed in the expansion unit is deallocated.
The predetermined process may be, for example, a process for releasing a lock by sending a password to a device which is installed in an expansion unit physically attached to the computer main unit and the use of which is locked by the password. The password for releasing the lock in this process may be obtained by prompting a user to enter the password.
The predetermined process may also be a process for programming a data transfer rate, programming a timer value for switching a device to a sleep status after the device is idle for a certain period, or deactivating a device installed in the expansion unit to be detached from the computer main unit.
As described above, according to the present invention, a predetermined process is performed by using a predetermined I/O resource ensured not to be used in processing. Therefore, highly complicated processes, such as a process for finding an I/O resource that is not allocated to other devices, is not required, and the predetermined process can be performed easily for an expansion unit that is attached to a computer main unit or is to be detached from the computer main unit while an operating system is running on the computer main unit.
Because the expansion unit control method according to the present invention can be implemented by a BIOS by itself, which is installed in the computer main unit, the predetermined process can be performed surely for a device installed in the expansion unit without depending on a special driver, which, for example, can fail to be re-installed after the reformatting of a hard disk drive or can be uninstalled.
If a device installed in the expansion unit is an IDE device conforming to the Integrated Drive Electronics (IDE) standard, then an AT Attachment (ATA) command can be used as the information exchanged with the device to perform the predetermined process. The size of a group of registers provided correspondingly to the IDE device for exchanging information is 20 bytes for each channel. If the size of I/O space that can be allocated as a predetermined I/O resource is smaller than 20 bytes (e.g., 8 bytes), it is difficult to allocate I/O space to all of the registers in the group of registers.
Therefore, preferably, if the size of the I/O space as the predetermined I/O resource is smaller than the size of a group of registers for sending and receiving information that is provided in the expansion unit correspondingly to a device installed in the expansion unit, then the I/O space is allocated to a command accepting register in the group of registers to perform the predetermined process in PIO mode (i.e., all the registers in the group are used if a DMA/PCI bus master transfer mode is used), or the I/O space is allocated to the command accepting register in the group of registers and an ATA command is sent to it. Then, the I/O space is allocated to a status notification register in the group of registers, and it is determined that the device received the ATA command to perform the predetermined process. Thus, the I/O space smaller than the size of the group of registers can be used to exchange information with the IDE device.
The computer according to the present invention, as with the expansion unit control method of the present invention, allows a predetermined process to be performed easily for an expansion unit that is attached to a computer main unit or is to be detached from the computer main unit while an operating system is running on the computer main unit, because allocation means allocates a predetermined I/O resource ensured not to be used in processing to a device installed in the expansion unit when the computer main unit is physically attached to an expansion unit, or the computer main unit is to be detached from the expansion unit while an operating system is running on the computer main unit to which the expansion unit containing one or more device can be attached. Further, processing means performs a predetermined process for the device by sending and receiving information to and from the device through the predetermined I/O resource. Additionally, deallocation means deallocates the predetermined I/O resource allocated to the device.
The recording medium according to the present invention contains a program for implementing by a computer a process (i.e., a method) for the expansion unit control method of the present invention, which includes allocating a predetermined I/O resource ensured not to be used in processing to a device installed in the expansion unit when the computer main unit is physically attached to an expansion unit, or the computer main unit is to be detached from the expansion unit while an operating system is running on the computer main unit to which the expansion unit containing one or more device can be attached, performing a predetermined process for the device by sending and receiving information to and from the device through the predetermined I/O resource, and deallocating the predetermined I/O resource allocated to the device.
Therefore, by reading the program contained in the recording medium, a predetermined process can be performed easily for an expansion unit that is attached to a computer main unit, or is to be detached from the computer main unit while an operating system is running on the computer main unit, as with the expansion unit control method of the present invention.
The transmission medium according to the present invention transmits a program for implementing, by a computer, a process (i.e., a method) for the expansion unit control method of the present invention, which includes allocating a predetermined I/O resource ensured not to be used in processing to a device installed in the expansion unit when the computer main unit is physically attached to an expansion unit, or the computer main unit is to be detached from the expansion unit while an operating system is running on the computer main unit to which the expansion unit containing one or more device can be attached, performing a predetermined process for the device by sending and receiving information to and from the device through the predetermined I/O resource, and deallocating the predetermined I/O resource allocated to the device.
Therefore, a predetermined process can be performed easily for an expansion unit that is attached to a computer main unit, or is to be detached from the computer main unit while an operating system is running on the computer main unit, as with the expansion unit control method of the present invention, by the computer temporarily storing the program transmitted by the transmission medium in storage means, and then reading the program from the storage means to execute the program.
The present disclosure relates to subject matter contained in Japanese Patent Application No. 2000-36864, filed Feb. 15, 2000, which is expressly incorporated herein by reference in its entirety.